package com.bonc.modules.rpt.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bonc.modules.rpt.param.FixParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author jinlong
 * @date 2021/7/21
 */
@Mapper
public interface DynamicDao {

    @Select("select to_char(to_date(max(STATIS_DATE), 'YYYYMMDD'),'YYYY-MM-DD') as maxDate from ${tableName}")
    String selectMaxDate(@Param("tableName") String tableName);


    Page<Map> selectPage(@Param("page") Page page, @Param("fixParam") FixParam fixParam);

    List<Map> selectList(@Param("fixParam") FixParam fixParam);

}
